<div class="dux-tools">
  <div class="bread-head">内容管理 <span class="small">栏目总数：{$category_count}个，内容总数：{$content_count}条，未审核内容{$audit_count}条</span> </div>
  <br>
  <div class="tools-function clearfix">
    <div class="float-left"> <a class="button button-small bg-main icon-list" href="__URL__"> 内容列表</a> </div>
  </div>
</div>
<div class="admin-main">
  <div class="panel dux-box">
    <div class="table-tools clearfix ">
      <div class="float-left">
        <div class="form-inline">
            <div class="form-group">
              <div class="field">
                <label>当前列表：</label>
                <font color=green><?php if(empty($_GET['position'])&&empty($_GET['search'])){ echo '未审核内容';}else{echo '筛选内容';} ?></font>
              </div>
            </div>
            <div class="form-group">
              <div class="field">
                <label>推荐位</label>
                <select id="position" onchange="javascript:location.href=this.value;" class="input">
  	<option value="__URL__">默认</option>
  <!--foreach:{$position_list $vo}--> 
  	<option value="__URL__/index/position-{$vo.id}"  <?php if($_GET['position']==$vo['id']){ ?> selected="selected" <?php } ?> >{$vo.name}</option>
  <!--{/foreach}-->
  </select>
              </div>
            </div>
            <div class="form-group">
              <div class="field">
                <label>搜索关键词</label>
                <input style="width:100px" name="search" type="text" class="input" id="search" value="<?php echo urldecode($_GET['search']) ?>" />
              </div>
            </div>
            <div class="form-button">
                <button class="button" type="button" onClick="javascript:location.href='__URL__/index/search-'+$('#search').val();">搜索</button>
            </div>
        </div>
      </div>
    </div>
    <div class="table-responsive">
      <table id="table" class="table table-hover ">
        <tbody>
          <tr>
            <th width="80">选择</th>
            <th width="*">编号</th>
            <th width="*">标题</th>
            <th width="*">栏目</th>
            <th width="*">审核</th>
            <th width="*">更新时间</th>
            <th width="150">操作</th>
          </tr>
          <!--foreach:{$list $vo}-->
          <tr id="del_{$vo['aid']}">
            <td><center><input name="id[]" type="checkbox" id="id[]" value="{$vo['aid']}" ></td>
            <td><center>{$vo.aid}</center></td>
            <td><span>{$vo.title}</span>
             <?php 
            if(!empty($vo['position'])){
                $str_list=model('position')->content_list($vo['position']);
                foreach ($str_list as $value) {
                    echo ' <span class="tags_span">['.$value['name'].']</span> ';
                }
            }
             ?>
             <?php if($edit_power){ ?>
             &nbsp;&nbsp;<a class="quickeditor" style=" display:none" href="javascript:;" onclick="quickeditor('__APP__/content_index/edit/id-{$vo.aid}')">[快速编辑]</a>
             <?php } ?>
            </td>
            <td>
            <a href="#">{$vo.cname}</a>
            </td>
            <td><center>
            <!--if:{$vo['status']<>0}-->
            <font color=green><b>√</b></font>
            <!--{else}-->
            <font color=red><b>×</b></font>
            <!--{/if}-->
            </center></td>
            <td><center>
            {$php(echo date('Y-m-d H:i:s',$vo['updatetime']))}
            </center></td>
            
            <td><center>
            <?php if($edit_power){ ?>
            <a href="__APP__/{$vo.admin_content}/edit/id-{$vo.aid}" class="button bg-blue button-small icon-pencil" title="修改"></a>
            <?php } ?>
            <?php if($del_power){ ?>
            &nbsp;&nbsp;<a class="button bg-red button-small icon-trash-o js-del" href="javascript:void(0);" onclick="del('{$vo.aid}',this,'__APP__/{$vo.admin_content}/del')" title="删除"></a>
            <?php } ?>
            </center></td>
          </tr>
          <!--{/foreach}-->
        </tbody>
      </table>
    </div>
    <div class="panel-foot table-foot clearfix">
      <div class="float-left">
        <div class="form-inline">
          <div class="form-button"> <a class="button bg-blue button-small" onClick="javascript:selectall('id[]');" type="button">全选</a>
             <?php if($past_power){ ?>
          	<a class="button bg-blue button-small" onClick="javascript:audit(1);" type="submit">发布</a>
          	<?php } ?>
            <?php if($cancel_power){ ?>
          	<a class="button bg-blue button-small" onClick="javascript:audit(2);" type="submit">草稿</a>
          	<?php } ?>
          </div>
        </div>
        <br>
      </div>
      <div class="float-right">
        <div class="page_tool">
          <div class="page" >{$page}</div>
        </div>
      </div>
    </div>
  </div>
</div>
<script>
//快速编辑
$('tr').hover(
	function () {
		$(this).find('.quickeditor').show();
	},
	function () {
		$(this).find('.quickeditor').hide();
	}
);
function quickeditor(url){
	urldialog({
	title:'快速编辑',
	url:url,
	width:550,
	height:570
	});
}
</script>
{include file="content/index_common"}

